package per.wxp.backend.web;


import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

import java.util.HashMap;
import java.util.Map;

@RestController
@CrossOrigin(origins = "http://localhost:4200")
public class IndexController {


    @GetMapping("/index")
    public Mono<String> sayHelloWorld() {
        return Mono.just("Index");
    }


    @GetMapping("/map")
    public Mono<Map<String,String>> Map() {
        Map<String,String> map=new HashMap<>();
        map.put("aa","ccc");

        return Mono.just(map);
    }

}
